package com.example.base.mvi

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import com.jaeger.library.StatusBarUtil

abstract class BaseViewActivity<VDB:ViewDataBinding>:AppCompatActivity() {
    lateinit var binding:VDB
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView(this,getLayout())
        initView()
        //沉浸式状态栏
        StatusBarUtil.setTranslucentForImageView(this,0,null)
    }

    abstract fun getLayout(): Int

    abstract fun initView()
}